package com.zhisheng.day10_tlias.service.impl;

import com.zhisheng.day10_tlias.entry.OperateLog;
import com.zhisheng.day10_tlias.mapper.OperateLogMapper;
import com.zhisheng.day10_tlias.service.OperateLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class OperateLogServiceImpl implements OperateLogService {
    @Autowired
    private OperateLogMapper mapper;

    @Transactional(propagation = Propagation.REQUIRES_NEW,noRollbackFor = Exception.class)
    public void insert(OperateLog log){
        mapper.insert(log);
    }
}
